﻿namespace EntityAccessInterfaces;

public interface IUserServices
{
    /// <summary>
    /// 添加用户
    /// </summary>
    /// <param name="user">要添加的用户</param>
    /// <returns>如果成功，则返回新增的用户ID。否则返回null</returns>
    Task<AddResult<int>> AddUserAsync(User user);

    /// <summary>
    /// 删除用户
    /// </summary>
    /// <param name="userID">要删除的用户ID</param>
    /// <returns>操作结果</returns>
    Task<DeleteResult> DeleteUserAsync(int userID);

    /// <summary>
    /// 更新用户信息
    /// </summary>
    /// <param name="userID">要更新的用户ID</param>
    /// <param name="newUser">新的用户对象</param>
    /// <returns>操作结果</returns>
    Task<UpdateResult> UpdateUserAsync(User newUser);

    /// <summary>
    /// 获取用户
    /// </summary>
    /// <param name="ID">要获取的用户ID</param>
    /// <returns>查询结果</returns>
    Task<GetResult<User>> GetUserAsync(int ID);
}
